import request from '@/utils/request'

//获取视频列表
export function getVideoList(params) {
  return request({
    url: '/video/',
    method: 'get',
    params,
  })
}

//添加视频
export function addVideo(data) {
  return request({
    url: `/video/`,
    method: 'post',
    data,
  })
}

//修改视频
export function updateVideo(id, data) {
  return request({
    url: `/video/${id}/`,
    method: 'patch',
    data,
  })
}

//删除视频
export function deleteVideo(id) {
  return request({
    url: `/video/${id}/`,
    method: 'delete',
  })
}
